﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ChineseRemainderTheorem.Core;
using ChineseRemainderTheorem.Mvvm;

namespace ChineseRemainderTheorem.ViewModels
{
    public class MainViewModel : BaseViewModel
    {
        #region Fields

        private ShareViewModel _shareViewModel;

        private RestoreViewModel _restoreViewModel;

        #endregion

        #region Properties

        public ShareViewModel ShareViewModel
        {
            get { return _shareViewModel; }
            set { SetProperty(ref _shareViewModel, value, "ShareViewModel"); }
        }

        public RestoreViewModel RestoreViewModel
        {
            get { return _restoreViewModel; }
            set
            {
                SetProperty(ref _restoreViewModel, value, "RestoreViewModel");
            }
        }

        #endregion

        #region Constructors

        // todo: если нечего делать, можешь еще сюда и IOC запилить :)
        public MainViewModel()
        {
            ISecretSharingService secretSharingService = new SecretSharingService(new BigIntegerRandom());
            _shareViewModel = new ShareViewModel(secretSharingService);
            _restoreViewModel = new RestoreViewModel(secretSharingService);
        }

        #endregion
    }
}
